<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>总和</title>
</head>
<body>
<script>
    var sum = 0;
    for (let i = 0; i <= 10; i++) {
        sum = sum + i;
        console.log(sum)
    }

</script>
</body>
</html>